package cn.jjzd.info.service;

import cn.jjzd.info.mapper.ConsultantRelationMapper;
import cn.jjzd.info.pojo.ConsultantRelation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;
@Service
public class ConsultantRelationService {

    @Autowired
    private ConsultantRelationMapper consultantRelationMapper;

    public ConsultantRelation queryConsultant(Long consultiantId,Long areaId,Long businessTypeId){
        //初始化example
        Example example = new Example(ConsultantRelation.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("consultantId",consultiantId);
        criteria.andEqualTo("areaId",areaId);
        criteria.andEqualTo("businessTypeId",businessTypeId);
        return consultantRelationMapper.selectOneByExample(example);
    }

}
